﻿using Newtonsoft.Json;
using Telegram.Bot;
using Telegram.Bot.Types;

namespace Kz.Telegram.Bot.Console.HandleUpdate
{
    public class ChatJoinRequestHandler : IHandler
    {
        public async Task Handle(ITelegramBotClient botClient, Update update, CancellationToken cancellationToken)
        {
            var user = JsonConvert.SerializeObject(update.ChatJoinRequest.From);

            await System.Console.Out.WriteLineAsync("有新用户申请加入群组");
			await System.Console.Out.WriteLineAsync(user);

        }
    }
}
